<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions"
	xmlns:p="http://primefaces.prime.com.tr/ui">
	


<ui:composition template="/templates/user/content.xhtml">
	<ui:define name="pageTitle">Manage Property for Sale</ui:define>
	<ui:define name="body">
		<div class="container_24">
			<div class="wrapper">	
			<ui:include src="/templates/user/sidebar_for_user.xhtml"/>
				<div class="grid_17">
					<div class="inside">
						<header>
						<h2>Search Property</h2>
						</header>
						<div class="content">
							<h:form id="search-form" styleClass="table_box">							
						<p:panel header="Search For Rent">
						 	<p:panel header="Title">
						 	<h:inputText value="#{mProperty_Search.titleFilter}" id="titles"/>
						 	<p:watermark value="Enter Title" for="titles"/>
						 	</p:panel>
						 	<p:panel header="Location">
						 	<h:outputLabel value="Address: "/><h:inputText value="#{mProperty_Search.addressFilter}" id="address"/><p:watermark value="Enter Address" for="address"/>
						 	<h:outputLabel value="State: " /><h:selectOneMenu
												value="#{mProperty_Search.stateFilter}">
												<f:selectItem noSelectionOption="true" itemLabel="All" />
												<f:selectItem itemValue="Sydney" itemLabel="Sydney" />
												<f:selectItem itemValue="Brisbane" itemLabel="Brisbane" />
												<f:selectItem itemValue="Adelaide" itemLabel="Adelaide" />
												<f:selectItem itemValue="Melbourne" itemLabel="Melbourne" />
												<f:selectItem itemValue="Perth" itemLabel="Perth" />
												
															</h:selectOneMenu> 
						 	</p:panel>
						 	<p:panel header="No. of Room">
						 	<h:outputLabel value="No.Of Bed: "/><h:inputText value="#{mProperty_Search.noofbedroomFilter}" id="bedroom"/><p:watermark value="Enter No.Of Bedroom" for="bedroom"/>
						 	<h:outputLabel value="No.Of Bath: "/><h:inputText value="#{mProperty_Search.noofbathroomFilter}" id="bathroom"/><p:watermark value="Enter No.Of Bathroom" for="bathroom"/>
						 	</p:panel>
						 	<p:panel header="Price">
						 	<h:outputLabel value="Deposit: " /><h:selectOneMenu value="#{mProperty_Search.depositFilter}">
							<f:selectItem noSelectionOption="true" itemLabel="All" />
									<f:selectItem itemValue="500000" itemLabel="Under 1.000.000" />
									<f:selectItem itemValue="1500000"
										itemLabel="From 1.000.000 to 2.000.000" />
									<f:selectItem itemValue="3000000"
										itemLabel="From 2.000.000 to 4.000.000" />
									<f:selectItem itemValue="5000000"
										itemLabel="From 4.000.000 to 6.000.000" />
									<f:selectItem itemValue="7000000"
										itemLabel="From 6.000.000 to 8.000.000" />
									<f:selectItem itemValue="9000000"
										itemLabel="From 8.000.000 to 10.000.000" />
									<f:selectItem itemValue="10000000" itemLabel="Over 10.000.000" />
									<a4j:ajax render="table" execute="@this" event="change" />
								</h:selectOneMenu>
						 	<h:outputLabel value="Rent: " /><h:inputText value="#{mProperty_Search.rent}" id="rent"/><p:watermark value="Enter Rent" for="rent"/>
						 	</p:panel>
						 	<p:commandButton actionListener="#{mProperty_Search.SearchByPropForRent()}" value="Search" update="panel,display"/>
						</p:panel>	
						
					
				</h:form>
						</div>
						<p:outputPanel rendered="#{mProperty_Search.nullCheck}">
									<h:outputText value="No Record was found"/>
									</p:outputPanel>
						<h2>Search Result</h2>
						<div class="grid_17">
						<div class="inside">
							<article>
							<div class="container_24">
								<div class="grid_16 alpha">
									<div class="box2">
									
									<ui:repeat var="items" value="#{mProperty_Search.allPropForRent}">
										<h3>Title goes here</h3>
										<div class="image_box">
										
										</div>
										<div class="prop_info">
											<ul class="list1">
											<li><strong>Seller: </strong> <h:outputText value="#{items.property.account.name}"/></li>
											<li><strong>State: </strong><h:outputText value="#{items.property.state}"/></li>
											<li><strong>Price: </strong> <h:outputText value="#{items.deposit}"/> </li>
											<li><strong>Size: </strong><h:outputText value="#{items.bedRoom}"/> </li>
										</ul>
										<span class="details_link"><a href="#">Details</a></span>
										</div>
										</ui:repeat>
									</div>
								</div>
								
							</div>
							</article>
							
							
						</div>
					</div>					
						</div>					
					</div>
				</div>
			</div>
	</ui:define>
</ui:composition>
</html>
